import router from '@system.router';
export default {
    data: {
        chosentype:"地震"
    },
//    选择题目类型
    onRadioChange1(inputValue, e) {

        if(e.checked){
            console.log("地震");
            this.chosentype="地震";
        }
    },
    onRadioChange2(inputValue, e) {
        //        console.info(inputValue);
        if(e.checked){
            console.log("火灾");
            this.chosentype="火灾";
        }
    },
    onRadioChange3(inputValue, e) {
        //        console.info(inputValue);
        if(e.checked){
            console.log("洪水");
            this.chosentype="洪水";
        }
    },
    onRadioChange4(inputValue, e) {
        //        console.info(inputValue);
        if(e.checked){
            console.log("泥石流");
            this.chosentype="泥石流";
        }
    },
//    跳转到相应界面
    fankui(){
        this.$app.$def.globalData.rightNum=0;
        this.$app.$def.globalData.wrongNum=0;
        if(this.chosentype=="地震"){
            router.push({
                uri:'pages/questiontype/earth/earth',
            })
        }
        if(this.chosentype=="火灾"){
            router.push({
                uri:'pages/questiontype/fire/fire',
            })
        }
        if(this.chosentype=="洪水"){
            router.push({
                uri:'pages/questiontype/sea/sea',
            })
        }
        if(this.chosentype=="泥石流"){
            router.push({
                uri:'pages/questiontype/falldown/falldown',
            })
        }
    }
}
